]> git.neil.brown.name Git - wiggle.git/commitdiff
Browser: improve rendering of conflicts in the the 'merge' view.
authorNeil Brown <neilb@suse.de>
Fri, 11 May 2012 09:30:22 +0000 (19:30 +1000)
committerNeil Brown <neilb@suse.de>
Fri, 11 May 2012 09:30:22 +0000 (19:30 +1000)
I was ignoring the in_conflict value, so the 'original' side
of a conflict wasn't properly displayed, and so looked confusing.

Signed-off-by: NeilBrown <neilb@suse.de>
vpatch.c

index e91078ce4f715d879712daf66a931228fd240599..f32389132c964261a19e1983bf55da91ae618da8 100644 (file)
--- a/vpatch.c
+++ b/vpatch.c
@@ -579,6 +579,8 @@ static int check_line(struct mpos pos, struct file fm, struct file fb,
                        rv |= WIGGLED;
                else if (m[pos.p.m].type == Unmatched)
                        unmatched = 1;
+               if (m[pos.p.m].in_conflict)
+                       rv |= CONFLICTED | CHANGES;
                e = prev_melmnt(&pos.p, fm, fb, fa, m);
        } while (e.start != NULL &&
                 (!ends_mline(e)
@@ -845,7 +847,7 @@ static void draw_mside(int mode, int row, int offset, int start, int cols,
                tag_attr = a_delete;
                if ((mode & ORIG) && (mode & CONFLICTED)) {
                        tag = '|';
-                       tag_attr = a_delete | A_UNDERLINE;
+                       tag_attr = a_delete;
                }
                mode &= (ORIG|BEFORE);
                break;